package com.wuye.model.customer;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by zhanchi on 2016/6/30.
 */
@Entity
@Table(name="customerOption")
public class CustomerDetail implements Serializable{
    public String toString() {
        try {
            return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
        } catch (Exception e) {
            return e.getMessage();
        }
    }
    @Id
    @Column(name="wuye_customerOption_id")
    private Integer customerId;
    @Column(name="wuye_customerOption_name")
    private String customerName;
    @Column(name="wuye_customerOption_sums")
    private String customerSum;
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="wuye_customerOption_releaseTime")
    private Date beginTime;
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="wuye_customerOption_endTime")
    private Date endTime;
    @Column(name="wuye_customerOption_status")
    private String status;
    @Column(name="wuye_customerOption_pollId")
    private Integer pollId;
    @Column(name="wuye_customerOption_pollName")
    private String pollName;

    public CustomerDetail(Integer customerId, String customerName, String customerSum, Date beginTime, Date endTime, String status, Integer pollId, String pollName) {
        this.customerId = customerId;
        this.customerName = customerName;
        this.customerSum = customerSum;
        this.beginTime = beginTime;
        this.endTime = endTime;
        this.status = status;
        this.pollId = pollId;
        this.pollName = pollName;
    }

    public CustomerDetail() {
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerSum() {
        return customerSum;
    }

    public void setCustomerSum(String customerSum) {
        this.customerSum = customerSum;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getPollId() {
        return pollId;
    }

    public void setPollId(Integer pollId) {
        this.pollId = pollId;
    }

    public String getPollName() {
        return pollName;
    }

    public void setPollName(String pollName) {
        this.pollName = pollName;
    }
}
